package com.gzzn.validate.support;

import com.gzzn.validate.internal.Rule;

/**
 * author : zdp（zdp118@gmail.com）
 * date   : 2014-3-1
 * 主机地址校验
 */
public class HostValidate extends ValidateWithRegex {

    static final String messageT = "Please enter a valid Host address.";
    static final String HOST_REGEX = "^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,65}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6}$";

    public HostValidate() {
        super(messageT,Rule.HOST, ValidateWithRegex.OR_TEST, IPv4Validate.IPV4_REGEX, HOST_REGEX);
    }
}
